package com.gaojinqi.sys.modular.rbac.vo;

import com.gaojinqi.base.common.enums.StateEnum;
import com.gaojinqi.base.common.validation.custom.EnumValid;
import com.gaojinqi.base.common.validation.group.Default;
import com.gaojinqi.base.common.validation.group.Insert;
import com.gaojinqi.sys.common.enums.GenderEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 用户新增修改参数
 *
 * @author gaojinqi
 * @version 1.0
 * @since 2020年05月28日
 */
@Data
public class UserSaveVo {

    @ApiModelProperty(value = "用户名")
    @NotBlank(message = "请输入用户名", groups = Insert.class)
    private String userName;

    @ApiModelProperty(value = "密码")
    @NotBlank(message = "请输入密码", groups = Insert.class)
    private String password;

    @ApiModelProperty(value = "启用状态")
    @EnumValid(value = StateEnum.class, groups = Default.class, message = "请选择正确的启用状态")
    @NotBlank(message = "请选择启用状态", groups = Insert.class)
    private Byte state;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "真实名称")
    private String trueName;

    @ApiModelProperty(value = "性别")
    @EnumValid(value = GenderEnum.class, groups = Default.class, message = "请选择正确的性别类型")
    private Byte gender;

}
